import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router'
import {AppConfig} from '@/config/AppConfig'

const routerMode = {
  history: () => createWebHistory(AppConfig.getBaseUrl()),
  hash: () => createWebHashHistory(AppConfig.getBaseUrl())
}

const router = createRouter({
  history: routerMode[AppConfig.getRouterMode()](),
  routes: [],
})

export default router
